package com.ezhan.api.Service;

import com.ezhan.api.InstallSerivce;
import com.ezhan.entity.PackageInfo;
import com.ezhan.install.PackageInstaller;


import java.io.File;

public class InstallServiceImpl implements InstallSerivce {
    private PackageInstaller packageInstaller;

    public InstallServiceImpl() {
        this.packageInstaller = new PackageInstaller();
    }

    //安装软件
    @Override
    public  boolean installPackage(PackageInfo packageInfo, String installPath, File parentDir) {
        return packageInstaller.installPackage(packageInfo,installPath,parentDir);
    }

    //设置系统变量
    @Override
    public void setEnv(PackageInfo packageInfo, String installPath) {
        packageInstaller.setEnv(packageInfo,installPath);
    }

}
